#ifndef CORDIC_H
#define CORDIC_H

#include "stm32g4xx_hal.h"
#include "stm32g4xx_hal_cordic.h"

#ifdef __cplusplus
extern "C" {
#endif

extern CORDIC_HandleTypeDef hcordic;

void CORDIC_Init(void);
void CORDIC_CalcCosSin(float angle, volatile float *cos_out, volatile float *sin_out);

// Add HAL CORDIC MSP initialization callback
void HAL_CORDIC_MspInit(CORDIC_HandleTypeDef* hcordic);

#ifdef __cplusplus
}
#endif

#endif // CORDIC_H